package com.spring.demo6.eg2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author vhans
 */
@Component
public class Service3 {

    // 有多个候选者{Service1,Service2},按字段名称进行注入
    @Autowired
    private IService service1;

    @Override
    public String toString() {
        return "Service3{" +
                "service1=" + service1 +
                '}';
    }
}
